package User

import (
	"source-admin-go/pkg/e"
	"source-admin-go/pkg/httptool"
	"source-admin-go/src/models"

	"github.com/gin-gonic/gin"
)

type Result struct {
	List []models.UserModel `json:"list"`
}

func GetUsers() gin.HandlerFunc {
	return func(context *gin.Context) {
		appG := httptool.Gin{Context: context}

		var users []models.UserModel
		models.UserModel{}.GetAllNotDel(&users)
		appG.Response(e.SUCCESS, users)
	}
}
